<?php

namespace app\admin\controller;

use app\BaseController;
use app\common\model\TagModel;

class  Tag extends  BaseController
{
    /**
     * @var TagModel
     */
    private $model;

    public function initialize()
    {
        $this->model = new TagModel();
    }

    public function index()
    {
        $result           = [
            "status" => "no",
            "data"   => [],
            "msg"    => "查找失败"
        ];
        $option           = $this->option();
        $result["status"] = "ok";
        $result["msg"]    = "查找成功";
        $result["data"]   = $this->model->pageData($option);

        return json($result);
    }
}